package com.im.service.dto;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/** 
 * 分页查询，增加公共表格合计属性
 */
public class PageQuery2<T> {

	private static final String ASC = "asc";
    private static final String DESC = "desc";
    
    private List<T> rows;
    /** 排序字段 **/
    private String sort;
    /** 正倒序**/
    private String order = ASC;
    /** 当前页数*/
    private Integer pageNumber = 1;
    /** 每页数据条数 */
    private Integer pageSize = 20;
    /** 总页数 */
    private Integer totalPages;
	/** 总记录 */
    private Long total;
	/** 表格合计 */
	private List<Map<String, String>> footer;

	public static String getASC() {
		return ASC;
	}

	public static String getDESC() {
		return DESC;
	}

	public List<T> getRows() {
		return rows;
	}

	public void setRows(List<T> rows) {
		this.rows = rows;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public Integer getPageNumber() {
		return pageNumber;
	}

	public void setPageNumber(Integer pageNumber) {
		this.pageNumber = pageNumber;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(Integer totalPages) {
		this.totalPages = totalPages;
	}

	public Long getTotal() {
		return total;
	}

	public void setTotal(Long total) {
		this.total = total;
	}

	public List<Map<String, String>> getFooter() {
		return footer;
	}

	public void setFooter(List<Map<String, String>> footer) {
		this.footer = footer;
	}

	public void addFoot(Map<String, String> foot) {
		if(footer == null) {
			footer = new ArrayList<Map<String, String>>();
		}
		footer.add(foot);
	}
}
